package com.iwhalecloud.uncc.properties.mq;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zq
 * @date 2021/10/12 16:38
 * @description ArchiverConsumerProperties
 */
@Configuration
@ConfigurationProperties(prefix = "mq")
public class ArchiverConsumerProperties {
    private final List<Consumer> consumers = new ArrayList<>();

    public List<Consumer> getConsumers() {
        return consumers;
    }

    public static class Consumer {

        private String topic;
        private String tag;
        private String groupName;
        private boolean isInOrder;
        private String handlerClass;
        private int consumeThreadMax;
        private int consumeThreadMin;
        private int consumeBatchSize;

        public String getTopic() {
            return topic;
        }

        public void setTopic(String topic) {
            this.topic = topic;
        }

        public String getTag() {
            return tag;
        }

        public void setTag(String tag) {
            this.tag = tag;
        }

        public String getGroupName() {
            return groupName;
        }

        public void setGroupName(String groupName) {
            this.groupName = groupName;
        }

        public boolean isInOrder() {
            return isInOrder;
        }

        public void setInOrder(boolean inOrder) {
            isInOrder = inOrder;
        }

        public String getHandlerClass() {
            return handlerClass;
        }

        public void setHandlerClass(String handlerClass) {
            this.handlerClass = handlerClass;
        }

        public int getConsumeThreadMax() {
            return consumeThreadMax;
        }

        public void setConsumeThreadMax(int consumeThreadMax) {
            this.consumeThreadMax = consumeThreadMax;
        }

        public int getConsumeThreadMin() {
            return consumeThreadMin;
        }

        public void setConsumeThreadMin(int consumeThreadMin) {
            this.consumeThreadMin = consumeThreadMin;
        }

        public int getConsumeBatchSize() {
            return consumeBatchSize;
        }

        public void setConsumeBatchSize(int consumeBatchSize) {
            this.consumeBatchSize = consumeBatchSize;
        }
    }
}
